package com.team.easybuy.mapper;

import com.team.easybuy.entity.Category;
import com.team.easybuy.entity.ProductCategory;
import com.team.easybuy.entity.ProductCategory2;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Scope;

import java.util.List;

@Mapper
public interface ProductCategoryMapper {

    List<ProductCategory> selectAllOne();

    List<ProductCategory2> selectAllTwo(Integer id);

    List<ProductCategory> selectAllThree(Integer id);

    List<Category> selectAll();

    Category selectByPId(Integer parentId);

    List<ProductCategory> selectById(Integer id);

    int deleteById(Integer id);

    List<ProductCategory> loadCateWhich(@Param("id") Integer id, @Param("type") Integer type);

    int insertCate(Category category);

    Category selectByPIdAndName(Category category);

    int updateCate(Category category);
}
